package com.fangjinwang.zhushunqing.Ui.Home.Presenter;

import com.fangjinwang.zhushunqing.Ui.Home.contrct.HomeContrct;
import com.jaydenxiao.common.baserx.RxSubscriber;

/**
 * Created by admin on 2016/11/4.
 */
public class HomePresenter extends HomeContrct.Presenter {

    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void getHomeDataRequest(String method,String requestData,boolean isEncrypt,String token) {
        mRxManage.add(mModel.getHomeData(method,requestData,isEncrypt,token).subscribe(new RxSubscriber<String>(mContext) {
            @Override
            protected void _onNext(String homeEntity) {
                mView.returnHomeData(homeEntity);
//                Log.d("---returnHomeData----",homeEntity.getD().toString()+"---");
            }

            @Override
            protected void _onError(String message) {

            }
        }));
    }
}
